import request from '@/utils/request'




//增加新闻浏览次数

export function plussXinWenPower(newsId) {
  return request({
    url: '/web/news/plussXinWenPower',
    method: 'get',
    params: {
      newsId:newsId
    }
  })
}




export function getXinWen() {
  return request({
    url: '/web/news/getXinWen',
    method: 'get',
    params: {
      type:2
    }
  })
}

export function getYouHui() {
  return request({
    url: '/web/news/getXinWen',
    method: 'get',
    params: {
      type:1
    }
  })
}
export function getGongGao() {
  return request({
    url: '/web/news/getXinWen',
    method: 'get',
    params: {
      type:0
    }
  })
}

export function searchXinWenByTitle(title) {
  return request({
    url: '/web/news/searchXinWenByTitle',
    method: 'get',
    params: {
      title:title
    }
  })
}

















// 查询信息管理列表
export function listNews(query) {
  return request({
    url: '/web/news/list',
    method: 'get',
    params: query
  })
}

// 查询信息管理详细
export function getNews(newsId) {
  return request({
    url: '/web/news/' + newsId,
    method: 'get'
  })
}

// 新增信息管理
export function addNews(data) {
  return request({
    url: '/web/news',
    method: 'post',
    data: data
  })
}

// 修改信息管理
export function updateNews(data) {
  return request({
    url: '/web/news',
    method: 'put',
    data: data
  })
}

// 删除信息管理
export function delNews(newsId) {
  return request({
    url: '/web/news/' + newsId,
    method: 'delete'
  })
}
